package routers

import (
	middlewares "chinasoccer/middleWare"
	_ "chinasoccer/models"
	"github.com/gin-gonic/gin"
)

//无需认证
func sysNoCheckRoleRouter(r *gin.RouterGroup) {

	//r = r.Group("/chinasoccer")
	r = r.Group("/chinasoccer")
	MBTIRouter(r)
	TestAnswerRouter(r)
	StudentRouter(r)
}

func InitRouter() *gin.Engine {

	r := gin.New()
	r.Use(gin.Logger())

	r.Use(gin.Recovery())
	r.Use(middlewares.Cors())

	g := r.Group("")

	sysNoCheckRoleRouter(g)
	return r
}
